package cn.wolfcode.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Hellocontroller {

    @Value("${server.port}")
    int port;

    @GetMapping("/hello")
    public String hello(@RequestHeader("X-real-ip") String ip, @RequestHeader("token") String token) {
        return "hello docker" + port + " " + ip + " " + token;
    }
    @GetMapping("/hehe")
    public String hehe() {
        return "hello hehe";
    }
}
